package com.mfcxy.serviceImpl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import com.mfcxy.service.IBaseService;
import com.mfcxy.tools.Page;
import com.mfcxy.tools.Tools;

/**
 *   基础公共的service
 *  用于所有的service的继承，里面主要存放了公共的方法和成员属性
 * @author mfcxy
 *
 */
@Service
public class BaseService implements IBaseService{
	
	//注入分页类
	@Autowired
	private Page page;
	
	@Autowired
	private Tools tools;
	
	@Resource(name = "redisTemplate")
	private RedisTemplate<String, Object> redistemplate;
	
	@Resource(name = "stringRedisTemplate")
	private StringRedisTemplate stringredistemplate;

	public Page getPage() {
		return page;
	}

	public Tools getTools() {
		return tools;
	}

	/**
	 * 獲取分類名稱
	 */
	@Override
	public String getClassName() {
		// TODO Auto-generated method stub
		return this.getClass().getSimpleName();
	}

	/*public RedisTemplate<String, Object> getRedistemplate() {
		return redistemplate;
	}*/

	public StringRedisTemplate getStringredistemplate() {
		return stringredistemplate;
	}


}
